<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Prueba Validar</title>
</head>
<body>

	<h1>Customize validation error message in JSF 2.0</h1>
<f:view>
	<h:form>

		<h:panelGrid columns="3">
 
			Enter your username :
 
			<h:inputText id="txtUserName" value="#{loginBean.username}" size="20"
				required="true" label="Username">
				<f:validateLength minimum="5" maximum="10" />
			</h:inputText>

			<h:message for="txtUserName" style="color:red" />
 
			Enter your DOB :
 
			<h:inputText id="txtPassword" value="#{loginBean.password}" size="20" required="true"
				label="password">
				<f:validateLength minimum="8" maximum="30" />
				<f:convertDateTime />
			</h:inputText>

			<h:message for="txtPassword" style="color:red" />

		</h:panelGrid>

		<h:commandButton value="Prueba" action="PruebaValidar" />

	</h:form>
	</f:view>
</body>
</html>